package com.lc202310;

import java.util.HashMap;
import java.util.Map;

/**
 * Description:
 *
 * @Create 2023/10/24 22:23
 * @Version 1.0
 */
public class Solution2395 {
    public boolean findSubarrays(int[] nums) {
        Map<Integer, Integer> map = new HashMap<>();
        int length = nums.length;
        for (int i = 0; i < length; i++) {
            if (i == length - 1) {
                continue;
            }
            int tmp = map.getOrDefault(nums[i] + nums[i + 1], 0) + 1;
            if (tmp >= 2) {
                return true;
            }
            map.put(nums[i] + nums[i + 1], tmp);
        }
        return false;
    }
}
